package com.example.mygrade.repository;
import com.example.mygrade.domain.Student;
import com.example.mygrade.domain.TeacherMa;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface TeacherMaRepository extends JpaRepository<TeacherMa,Integer> {

    List<TeacherMa> findByMnameAndMpass(String name,String pass);

    TeacherMa findByMnameLike(String userName);


//    @Modifying
//    @Query(value = "update sysmanager o set o.mpass = newpassword where o.mname = userName",nativeQuery = true)
//    public int updateNameAndPass(String userName,String newpassword);
}
